<?php

namespace App\Http\Controllers;

use Illuminate\Http\JsonResponse;

class HealthController extends Controller
{
    /**
     * 健康检查接口
     *
     * @return \Illuminate\Http\JsonResponse
     */
    public function check(): JsonResponse
    {
        return response()->json([
            'status' => 'ok',
            'time' => now(),
            'app_name' => config('app.name'),
            'environment' => config('app.env'),
        ]);
    }
}